import request from '@/utils/request'

// 查询authorizaton列表
export function listDeviceAuthorized(query) {
  return request({
    url: '/system/deviceAuthorized/list',
    method: 'get',
    params: query
  })
}

// 查询authorizaton详细
export function getDeviceAuthorized(authorizerId) {
  return request({
    url: '/system/deviceAuthorized/' + authorizerId,
    method: 'get'
  })
}

// 新增authorizaton
export function addDeviceAuthorized(data) {
  return request({
    url: '/system/deviceAuthorized',
    method: 'post',
    data: data
  })
}

// 修改authorizaton
export function updateDeviceAuthorized(data) {
  return request({
    url: '/system/deviceAuthorized',
    method: 'put',
    data: data
  })
}

// 删除authorizaton
export function delDeviceAuthorized(authorizerId) {
  return request({
    url: '/system/deviceAuthorized/' + authorizerId,
    method: 'delete'
  })
}
// 删除authorizaton
export function cancelAuthorized(query) {
  return request({
    url: '/system/deviceAuthorized/cancelAuthorized',
    method: 'delete',
    params: query
  })
}
